<!DOCTYPE html PUBLIC "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd>
<html>
	<head>
		<link rel="stylesheet" type="test/css" href="css/pageacceuil.css"/>
		<link rel="stylesheet" type="test/css" href="css/reset.css"/>
		<title> FreeBED project </title>
		<meta charset= "UTF-8" />
	</head>
	
	<body>
		<div id="header">
			<header class="background_alpha">
				<center><h1>FreeBED</h1></center>
			</header>
			<hr/>
		</div>
		
		<center>
			
			<div id="menu" class="border background_alpha">
				<div id="login">
					<?php
						if(isset($infos))
						{
							echo "<a href='freebed-logout.php'>Deconnexion</a>";
						}
						else
						{
							echo "<a href='freebed-login.php'>Login</a> ";
							echo "<a href='freebed-register.php'>S'enregistrer</a>";
						}
					?>
				</div>
				<div id="search" style="margin-top: 5px;">
					<a href="freebed-search.php">Recherche Avancée</a>
				</div>
			</div>	
			
			<div id="conteneur" class="border background_alpha">
				
				<div id="profil" class="border">
					<?php
						if(isset($infos))
						{
							echo "<img src='$infos[3]' style='margin-top: 150px; margin-bottom: 5px; width:150px; height:150px;'/>";
							echo "<p>Bienvenue, $infos[0] $infos[1]</p><br/>";
							if($infos[2] == 0)
								echo "<p>Status : Utilisateur</p>";
							else
							{
								echo "<p>Status : Bailleur</p>";
								echo "<p>Nombre de biens en ligne : $infos[4]</p>";
								echo "<br/><a href='freebed-panel.php'>Voir / Modifiez vos biens</a>";
							}
							echo "<br/><a href='freebed-add.php'>Mettre un bien en ligne</a>";
							echo "<br/><a href='freebed-moduser.php'>Modifier votre profil</a>";
						}
					?>
				</div>
				
				<div id="offre" class="border">
					<form style="margin-top: 150px;" id="loginform" name="loginform" action="freebed-moduser.php" method="post"><table border="1" width="300">
						<p>Changez vos coordonées ici</p><br/><br/>
						<table border="1" width="300">
							<tr>
								<td>Nom</td>
								<td><input type="text" name="nom" id="nom" value=<?php echo $infos[0];?> /></td> 
							</tr>
							<tr>
								<td>Prénom</td>
								<td><input type="text" name="prenom" id="prenom" value=<?php echo $infos[1];?> /></td>
							</tr>
							<tr>
								<td>Email</td>
								<td><input type="text" name="mail" id="mail" value=<?php echo $infos[5];?> /></td>
							</tr>
							<tr>
								<td>Mot de passe</td>
								<td><input type="password" name="password" id="password" value=<?php echo $infos[6];?> /></td>
							<tr>
								<td colspan="2" align="center"><input type="submit" name="envoyer" value="envoyer" /></td>
							</tr>
						</table>
					</form>
				</div>
			
			</div>
		
		</center>
			
		<center>
			<div id="footer" class="border background_alpha">
				<center>&copy; Poney</center>
			</div>
		</center>
	</body>
</html>
